package icu.sehnen.service.impl;

import icu.sehnen.mapper.ProductMapper;
import icu.sehnen.mapper.ProgressMapper;
import icu.sehnen.model.ProgressModel;
import icu.sehnen.service.ProgressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProgressServiceImpl implements ProgressService {

    @Autowired
    ProgressMapper progressMapper;
    @Override
    public List<ProgressModel> findAll() {
       return progressMapper.findAll();
    }

    @Override
    public ProgressModel findProgressById(Long id) {
        return progressMapper.findProgressById(id);
    }

    @Override
    public void delete(Long id) {
        progressMapper.delete(id);
    }

    @Override
    public void update(ProgressModel progressModel) {
        progressMapper.update(progressModel);
    }

    @Override
    public void deleteImg(Long id,String imgUrl) {
        progressMapper.deleteImg(id,imgUrl);
    }

    @Override
    public void add(ProgressModel progressModel) {
        progressMapper.add(progressModel);
    }
}
